#!/bin/bash

# 启动hdfs yarn 
start-all.sh

# 检查进程是否存在
function check_process() {
    if jps | grep -q $1; then
        echo "$1 进程存在"
    else
        echo "$1 进程不存在" >&2
        exit 1
    fi
}

# 检查进程
check_process DataNode
check_process SecondaryNameNode
check_process NameNode
check_process NodeManager
check_process ResourceManager
echo "check ok"
